import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
import Main from '../views/Main.vue'
const routes = [
  {
    path: '/',
    name: 'imooc',
    component: Main
  },
  {
    path: '/goodsList',
    name: 'goodsList',
    component: () => import('../views/GoodsList.vue')
  },
  {
    path: '/goodsDetail',
    name: 'goodsDetail',
    component: () => import('../views/GoodsDetail.vue')
  },
  {
    path: '/buy',
    name: 'buy',
    component:() => import('../views/Buy.vue')
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/registered',
    name: 'registered',
    component: () => import('../views/Registered.vue')
  }
]
const router = new Router({
  routes,
  mode: 'history'
})
export default router